# Maintainer: Balló György <ballogyor+arch at gmail dot com>

pkgname=sugar-datastore
pkgver=0.119
pkgrel=2
pkgdesc="Sugar datastore service"
arch=('loong64' 'x86_64')
url="https://sugarlabs.org/"
license=('GPL')
depends=('dbus-python' 'python-gobject' 'python-xapian')
source=(https://download.sugarlabs.org/sources/sucrose/glucose/$pkgname/$pkgname-$pkgver.tar.xz
        python310.patch)
sha256sums=('3d1d90bd5676398db8355ba878485d322371dfd8e35491862ddb993a4f18d07c'
            'ab1cf0024c0d1d1c91af037b6dcb2397c197070fd5d5a7bd4dc8948a40b5b520')

prepare() {
  cd $pkgname-$pkgver
  patch -Np1 -i ../python310.patch
}

build() {
  cd $pkgname-$pkgver
  ./configure --prefix=/usr
  make
}

package() {
  cd $pkgname-$pkgver
  make DESTDIR="$pkgdir" install
}
